package com.ch.home.bean;

import java.util.LinkedList;

/**
 * 菜馆类
 * Created by CHEN on 2019/8/24.
 */
public class Restaurant {


    private Integer restaurantId;
    private String restaurantName;
    private String restaurantDescription;
    private Integer restaurantRank;
    private String restaurantAddress;
    private String restaurantTag;
    private String restaurantPhone;

    private LinkedList<RestDish> restDish;

    public Restaurant() {
    }

    public Restaurant(Integer restaurantId, String restaurantName, String restaurantDescription, Integer restaurantRank, String restaurantAddress, String restaurantTag, String restaurantPhone, LinkedList<RestDish> restDish) {
        this.restaurantId = restaurantId;
        this.restaurantName = restaurantName;
        this.restaurantDescription = restaurantDescription;
        this.restaurantRank = restaurantRank;
        this.restaurantAddress = restaurantAddress;
        this.restaurantTag = restaurantTag;
        this.restaurantPhone = restaurantPhone;
        this.restDish = restDish;
    }

    public Integer getRestaurantId() {

        return restaurantId;
    }

    public void setRestaurantId(Integer restaurantId) {
        this.restaurantId = restaurantId;
    }

    public String getRestaurantName() {
        return restaurantName;
    }

    public void setRestaurantName(String restaurantName) {
        this.restaurantName = restaurantName;
    }

    public String getRestaurantDescription() {
        return restaurantDescription;
    }

    public void setRestaurantDescription(String restaurantDescription) {
        this.restaurantDescription = restaurantDescription;
    }

    public Integer getRestaurantRank() {
        return restaurantRank;
    }

    public void setRestaurantRank(Integer restaurantRank) {
        this.restaurantRank = restaurantRank;
    }

    public String getRestaurantAddress() {
        return restaurantAddress;
    }

    public void setRestaurantAddress(String restaurantAddress) {
        this.restaurantAddress = restaurantAddress;
    }

    public String getRestaurantTag() {
        return restaurantTag;
    }

    public void setRestaurantTag(String restaurantTag) {
        this.restaurantTag = restaurantTag;
    }

    public String getRestaurantPhone() {
        return restaurantPhone;
    }

    public void setRestaurantPhone(String restaurantPhone) {
        this.restaurantPhone = restaurantPhone;
    }

    public LinkedList<RestDish> getRestDish() {
        return restDish;
    }

    public void setRestDish(LinkedList<RestDish> restDish) {
        this.restDish = restDish;
    }

    @Override
    public boolean equals(Object o) {

        if (this == o) return true;
        if (o == null || getClass( ) != o.getClass( )) return false;

        Restaurant that = (Restaurant) o;

        if (restaurantId != null ? !restaurantId.equals(that.restaurantId) : that.restaurantId != null) return false;
        if (restaurantName != null ? !restaurantName.equals(that.restaurantName) : that.restaurantName != null)
            return false;
        if (restaurantDescription != null ? !restaurantDescription.equals(that.restaurantDescription) : that.restaurantDescription != null)
            return false;
        if (restaurantRank != null ? !restaurantRank.equals(that.restaurantRank) : that.restaurantRank != null)
            return false;
        if (restaurantAddress != null ? !restaurantAddress.equals(that.restaurantAddress) : that.restaurantAddress != null)
            return false;
        if (restaurantTag != null ? !restaurantTag.equals(that.restaurantTag) : that.restaurantTag != null)
            return false;
        if (restaurantPhone != null ? !restaurantPhone.equals(that.restaurantPhone) : that.restaurantPhone != null)
            return false;
        return restDish != null ? restDish.equals(that.restDish) : that.restDish == null;
    }

    @Override
    public int hashCode() {
        int result = restaurantId != null ? restaurantId.hashCode( ) : 0;
        result = 31 * result + (restaurantName != null ? restaurantName.hashCode( ) : 0);
        result = 31 * result + (restaurantDescription != null ? restaurantDescription.hashCode( ) : 0);
        result = 31 * result + (restaurantRank != null ? restaurantRank.hashCode( ) : 0);
        result = 31 * result + (restaurantAddress != null ? restaurantAddress.hashCode( ) : 0);
        result = 31 * result + (restaurantTag != null ? restaurantTag.hashCode( ) : 0);
        result = 31 * result + (restaurantPhone != null ? restaurantPhone.hashCode( ) : 0);
        result = 31 * result + (restDish != null ? restDish.hashCode( ) : 0);
        return result;
    }

    @Override
    public String toString() {
        return "Restaurant{" +
                "restaurantId=" + restaurantId +
                ", restaurantName='" + restaurantName + '\'' +
                ", restaurantDescription='" + restaurantDescription + '\'' +
                ", restaurantRank=" + restaurantRank +
                ", restaurantAddress='" + restaurantAddress + '\'' +
                ", restaurantTag='" + restaurantTag + '\'' +
                ", restaurantPhone='" + restaurantPhone + '\'' +
                ", restDish=" + restDish +
                '}';
    }
}
